package cn.iocoder.yudao.module.wengfu.dal.mysql.resultsdispatchroomdetails;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.wengfu.dal.dataobject.resultsdispatchroomdetails.ResultsDispatchRoomDetailsDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.wengfu.controller.admin.resultsdispatchroomdetails.vo.*;

/**
 * 全分析结果统计＿调度室_明细 Mapper
 *
 * @author yzs
 */
@Mapper
public interface ResultsDispatchRoomDetailsMapper extends BaseMapperX<ResultsDispatchRoomDetailsDO> {

    default PageResult<ResultsDispatchRoomDetailsDO> selectPage(ResultsDispatchRoomDetailsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ResultsDispatchRoomDetailsDO>()
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getSampleId, reqVO.getSampleId())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getTestId, reqVO.getTestId())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getMiningUnit, reqVO.getMiningUnit())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getMiningField, reqVO.getMiningField())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getMiningSupplier, reqVO.getMiningSupplier())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getOreProperty, reqVO.getOreProperty())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getOreType, reqVO.getOreType())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getQuantity, reqVO.getQuantity())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getP2o5, reqVO.getP2o5())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getMgo, reqVO.getMgo())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getCao, reqVO.getCao())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getSio2, reqVO.getSio2())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getFe2o3, reqVO.getFe2o3())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getAl2o3, reqVO.getAl2o3())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getAnalyst, reqVO.getAnalyst())
                .betweenIfPresent(ResultsDispatchRoomDetailsDO::getStartSamplingTime, reqVO.getStartSamplingTime())
                .betweenIfPresent(ResultsDispatchRoomDetailsDO::getEndSamplingTime, reqVO.getEndSamplingTime())
                .betweenIfPresent(ResultsDispatchRoomDetailsDO::getAnalysisDate, reqVO.getAnalysisDate())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getRcid, reqVO.getRcid())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getRn, reqVO.getRn())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getCn, reqVO.getCn())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getSheetNumber, reqVO.getSheetNumber())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getRc1, reqVO.getRc1())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getEnteredBy, reqVO.getEnteredBy())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getRemarks, reqVO.getRemarks())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getH2o, reqVO.getH2o())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getK2o, reqVO.getK2o())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getNa2o, reqVO.getNa2o())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getP2o5Sample, reqVO.getP2o5Sample())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getMgoSample, reqVO.getMgoSample())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getSio2Sample, reqVO.getSio2Sample())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getFe2o3Sample, reqVO.getFe2o3Sample())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getAl2o3Sample, reqVO.getAl2o3Sample())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getP2o5Settlement, reqVO.getP2o5Settlement())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getMgoSettlement, reqVO.getMgoSettlement())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getSio2Settlement, reqVO.getSio2Settlement())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getFe2o3Settlement, reqVO.getFe2o3Settlement())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getAl2o3Settlement, reqVO.getAl2o3Settlement())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getP2o5Sample2, reqVO.getP2o5Sample2())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getMgoSample2, reqVO.getMgoSample2())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getSio2Sample2, reqVO.getSio2Sample2())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getFe2o3Sample2, reqVO.getFe2o3Sample2())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getAl2o3Sample2, reqVO.getAl2o3Sample2())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getSampler, reqVO.getSampler())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getConcentration, reqVO.getConcentration())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getSpecificGravity, reqVO.getSpecificGravity())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getPowderRecoveryRate, reqVO.getPowderRecoveryRate())
                .eqIfPresent(ResultsDispatchRoomDetailsDO::getStrengthKgf, reqVO.getStrengthKgf())
                .orderByDesc(ResultsDispatchRoomDetailsDO::getRcid));
    }

}
